# Contributor: Thomas Deutsch <thomas@tuxpeople.org>
# Maintainer: Thomas Deutsch <thomas@tuxpeople.org>
pkgname=dnsperf
pkgver=2.13.1
pkgrel=0
pkgdesc="Dnsperf and resperf gather accurate latency and throughput metrics for DNS"
url="https://www.dns-oarc.net/tools/dnsperf"
arch="all"
license="Apache-2.0"
makedepends="
	ck-dev
	fstrm-dev
	json-c-dev
	krb5-dev
	ldns-dev
	libcap-dev
	libxml2-dev
	nghttp2-dev
	openssl-dev
	protobuf-c-dev
	"
subpackages="$pkgname-doc"
source="https://www.dns-oarc.net/files/dnsperf/dnsperf-$pkgver.tar.gz"

build() {
	CFLAGS="$CFLAGS -flto=auto -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
2e3d2b726dc90c8b55c42a01baad84cb927c2b1ea4c84e0bfcf05c196156ec542200a83db4feb232dcf06ba9b2a4685b46097968e5a5efebce189f6e04817fe2  dnsperf-2.13.1.tar.gz
"
